import { provide ,Context,inject,config} from 'midway';
// import { UtilService} from '../interface';
const fs = require('fs');
@provide()
export class Util {
    @inject()
    ctx: Context;
    @config()
    static;   
    @inject()
    logger; // 请求作用域，ContextLogger
    async mkdirFolder(folderName) {
        const dir = `${this.static.dir}/${folderName}`;
        this.logger.info('文件夹创建路径：', dir);
        if (!fs.existsSync(dir)) {
          fs.mkdirSync(dir);
        }
      }
}
